Similarity calculation method and device

ABSTRACT

In a similarity vector detecting apparatus ( 2 ), vector transform units ( 20 ), ( 21 ) implement transform by sequential matrix, Discrete Cosine Transform, Discrete Fourier Transform, Walsh-Hadamard Transform, or Karhunen-Lueve Transform to registered vector g and input vector f. A hierarchical distance calculating unit ( 23 ) performs, in a hierarchical manner, distance calculation between two vectors in order from vector component having high significance, i.e., component having large dispersion or eigen value in the above-described transform operations, or from low frequency component. Further, in the case where it is judged at a threshold value judgment unit ( 24 ) that integrated value of distances calculated up to a certain hierarchy is above threshold value S of distance, only output indicating that the integrated value is above the threshold value S is provided to truncate distance calculation.

TECHNICAL FIELD

The present invention relates to a similarity calculation method, asimilarity calculation apparatus, a program and a recording medium whichperform pattern matching between two vectors at a high speed.

This Application claims priority of Japanese Patent application No.2002-200481, field on Jul. 9, 2002, the entirety of which isincorporated by reference herein.

BACKGROUND ART

Hitherto, in order to detect pattern which is substantially the same asalready known pattern from an unknown input signal, or to evaluatesimilarity between two signals, judgment of similarity or coincidence ofdata is conducted in all technical fields to which signal processing isrelated, such as acoustic processing technology, image processingtechnology, communication technology, and/or rador technology, etc. Ingeneral, for detection of analogous data, there is used a technique ofallowing data to be feature vector to judge similarity by magnitude ofthe distance or angle (correlation) thereof.

Particularly, the so-called full search in which similarities betweeninput value and respective all candidiates are determined thereafter todetermine data where the distance is the shortest is a technology whichis most simple and has no detection leakage, and is frequently used inthe case where data quantity is small. However, e.g., in the case wherethe portion similar to input image or input voice (sound) is retrievedfrom a large quantity of accumulated images or voices (sounds), sincethe dimension of the feature vector per second is large and retrievalwith respect to those feature vectors which have been accumulated byseveral ten to several hundred hours is conducted, there is the problemthat retrieval time becomes vast when such simple full search isperformed.

On the other hand, in order to retrieve large quantity of data, in suchcases that complete coincidence retrieval of coded data, e.g., documentretrieval is conducted, high speed operation technology such as binarytree search or Hash method is used. In accordance with this technology,data are stored in advance in the state where they are put in order, toomit comparison of branch or table different from input data at the timeof retrieval to thereby realize high speed operation. However, in thecase where physical signal, e.g., image or sound, etc. is taken assubject, since distortion and/or noise essentially exist in data, it israre that coded data completely coincide with each other. As a result,in the case where high speed operation technology is used, a largenumber of detection leakages would take place. In addition, since datais essentially multi-dimensional, there is the problem that it isdifficult to implement in advance univocal sequencing to data.

In view of the above, there is proposed, in the Japanese PatentPublication Laid Open No. H08-123460, a technology in which processingfor grouping plural vectors close in distance to represent the groupedvectors by one representative vector is performed at the time of dataregistration to first calculate distance between input vector andrepresentative vector at the time of retrieval to conduct comparisonwith all vectors within group only with respect to vectors of the groupclose in distance to thereby permit similar (analogous) vector retrievalto be performed at high speed, and to have ability to reflect distortionof vector at multi-dimension.

Further, there is proposed, in the Japanese Patent Publication Laid OpenNo. 2001-134573, a technology in which vectors are encoded to index themby short code to thereby suppress increase in the number of times ofdistance calculations to permit high speed similar (analogous) dataretrieval.

However, in the technology described in the above-described JapanesePatent Publication Laid Open No. H08-123460, there was the problem thatsuitable grouping and selection of representative vector are required atthe time of registration so that registration operation becomestroublesome. Moreover, there was also the problem that since it is notlimited at the time of retrieval that, e.g., registered vector which isminimum distant with respect to input vector belongs to group in whichrepresentative vector which is minimum distant with respect to inputvector represents, operation for determining group to be retrievedbecomes troublesome.

Further, in the technology described in the above-described JapanesePatent Publication Laid Open No. 2001-134573, there was the problem thatdistance relationship between vectors is lost when encoding isperformed, or there results in complicated distance relationship innon-additive or non-monotonous manner so that mechanism of registrationand/or retrieval becomes troublesome.

Here, since image and/or sound are essentially time-series, it isdesirable that registration is conducted on the real time basis, and itis desirable that time order can be reflected at the time of retrieval.In other words, there are instances where such techniques which requiresregistration operation to exchange time-series, and/or which requiresredistribution (reshuffle) with respect to data or index of alreadyregistered data at the time of registration as in the case of thetechnology described in the above-described Japanese Patent PublicationLaid Open No. H08-123460 and Japanese Patent Publication Laid Open No.2001-134573 are not suitable for retrieval of time-series data.

That is, there is desired such a mechanism that retrieval is performedin a time extremely shorter than that at full search while satisfyingthe conditions where

-   -   (a) structural simplicity and robustness with respect to        distortion of full search are not lost,    -   (b) registration and/or deletion are conducted within real time,        and    -   (c) operation with respect to other already registered data is        not required by registration or deletion.

DISCLOSURE OF THE INVENTION

The present invention has been proposed in view of such conventionalactual circumstances, and its object is to provide a similaritycalculation method and a similarity calculating apparatus which performpattern matching between two vectors at a high speed while satisfyingthe above-described conditions, a program for allowing computer toexecute the similarity calculation processing, and a computer readablerecording medium where such program is recorded.

To attain the above-described object, a similarity calculation methodaccording to the present invention is directed to a similaritycalculation method of determining similarity between two input vectors,and includes a hierarchical distance calculation step of performingdistance calculation between the two input vectors in a hierarchicalmanner, a threshold value comparison step of comparing integrated valueof distances calculated at respective hierarchies of the hierarchicaldistance calculation step with threshold value set in advance, a controlstep of controlling distance calculation at the hierarchical distancecalculation step in accordance with comparison result at the thresholdvalue comparison step, and an output step of outputting, as thesimilarity, integrated value of distances calculated up to the lasthierarchy, wherein, at the control step, in the case where integratedvalue of distances calculated up to a certain hierarchy is above thethreshold value at the threshold value comparison step, control isconducted so that distance calculation is truncated.

In such similarity calculation method, distance calculation between twovectors is conducted in a hierarchical manner, whereby in the case whereintegrated value of distances calculated up to a certain hierarchy isabove a predetermined threshold value, it is only detected, withoutcalculating actual distance, that the integrated value of distances isabove the threshold value to thereby allow operation to be performed ata high speed.

Moreover, this similarity calculation method may further include atransform step of implementing a predetermined transform operation tothe two input vectors. In this case, at the hierarchical distancecalculation step, distance calculation between the two input vectorstransformed at the transform step is performed in a predetermined orderbased on the predetermined transform operation. Here, the predeterminedtransform operation is, e.g., transform for performing sequencing oforder of respective components constituting input vector in accordancewith magnitude of dispersion of the respective components, DiscreteCosine Transform, Discrete Fourier Transform, Walsh-Hadamard Transformor Karhunen-Lueve Transform.

Further, this similarity calculation method may include a division stepof taking out, in the predetermined order, respective components whichconstitute the two input vectors transformed at the transform step todivide them into hierarchical plural partial vectors. In this case, atthe hierarchical distance calculation step, distance calculation betweenrespective components which constitute partial vectors is performed in ahierarchical manner in order from the partial vector of the uppermosthierarchy, whereby in the case where integrated value of calculateddistances between all components which constitute partial vectors up toa certain hierarchy is below the threshold value, distance calculationbetween respective components which constitute partial vector of onehierarchy lower is performed.

Further, in order to attain the above-described object, a similaritycalculating apparatus according to the present invention is directed toa similarity calculating apparatus adapted for determining similaritybetween two input vectors, and comprises hierarchical distancecalculating means for performing distance calculation between the twoinput vectors in a hierarchical manner, threshold value comparing meansfor comparing integrated value of distances calculated at respectivehierarchies by the hierarchical distance calculating means withthreshold value set in advance, control means for controlling distancecalculation by the hierarchical distance calculating means in accordancewith comparison result by the threshold value comparing means, andoutput means for outputting, as the similarity, integrated value ofdistances calculated up to the last hierarchy, wherein the control meansconducts a control so as to abort (truncate) distance calculation in thecase where integrated value of distances calculated up to a certainhierarchy is above the threshold value as the result of comparison bythe threshold value comparing means.

Such similarity calculating apparatus performs distance calculationbetween two vectors in a hierarchical manner, whereby in the case whereintegrated value of distances calculated up to a certain hierarchy isabove a predetermined threshold value, it is only detected, withoutcalculating actual distance, that the integrated value of distances isthe threshold value or larger to thereby allow operation to be conductedat a high speed.

Further, this similarity calculating apparatus may further comprisetransform means for implementing a predetermined transform operation tothe two input vectors. In this case, the hierarchical distancecalculating means conducts distance calculation between the two inputvectors transformed by the transform means in a predetermined orderbased on the predetermined transform operation. Here, the predeterminedtransform operation is, e.g., transform for performing sequencing oforder of respective components which constitute input vector inaccordance with magnitude of dispersion of the respective components,Discrete Cosine Transform, Discrete Fourier Transform, Walsh-HadamardTransform, or Karhunen-Lueve Transform.

Further, this similarity calculating apparatus may comprise dividingmeans for taking out, in the predetermined order, respective componentswhich constitute the respective two input vectors transformed by thetransform means to divide them into hierarchical plural partial vectors.In this case, the hierarchical distance calculating means performs, in ahierarchical manner, distance calculation between respective componentswhich constitute partial vectors in order from the partial vector of theuppermost hierarchy, whereby in the case where integrated value ofcalculated distances between all components which constitute partialvectors up to a certain hierarchy is below the threshold value, distancecalculation between respective components which constitute partialvectors of one hierarchy lower is performed.

In addition, program according to the present invention serves to allowcomputer to execute the above-described similarity calculationprocessing, and recording medium according to the present invention is acomputer readable recording medium where such program is recorded.

Still further objects of the present invention and practical meritsobtained by the present invention will become more apparent from thedescription of the embodiments which will be given below.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a view for explaining outline of the configuration of asimilarity vector detecting apparatus in the first embodiment.

FIG. 2 is a flowchart for explaining processing at the time of vectorregistration in the similarity vector detecting apparatus.

FIG. 3 is a flowchart for explaining processing at the time of vectorretrieval in the similarity vector detecting apparatus.

FIG. 4 is a view for intuitively explaining processing in the firstembodiment.

FIG. 5 is a view showing an example in which there exists deviation indistribution of vector within feature space.

FIG. 6 is a view for explaining outline of the configuration of asimilarity vector detecting apparatus in the second embodiment.

FIG. 7 is a flowchart for explaining processing at the time of vectorregistration in the similarity vector detecting apparatus.

FIG. 8 is a flowchart for explaining processing at the time of vectorretrieval in the similarity vector detecting apparatus.

FIG. 9 is a view for explaining outline of the configuration of asimilarity vector detecting apparatus in the third embodiment.

FIG. 10 is a flowchart for explaining processing at the time of vectorregistration in the similarity vector detecting apparatus.

FIG. 11 is a flowchart for explaining processing at the time of vectorretrieval in the similarity vector detecting apparatus.

FIG. 12 is a flowchart for explaining an example of processing forextracting acoustic feature vector from acoustic signal.

FIG. 13 is a view for explaining an example of processing for extractingacoustic feature vector from acoustic signal.

FIG. 14 is a view for explaining transform encoding in acoustic signal.

FIG. 15 is a flowchart for explaining an example of processing forextracting acoustic feature vector from encoded acoustic signal.

FIG. 16 is a view for explaining an example of processing for extractingacoustic feature vector from encoded acoustic signal.

FIG. 17 is a flowchart for explaining an example of processing forextracting image feature vector from video signal.

FIG. 18 is a view for explaining an example of processing for extractingimage feature vector from video signal.

FIG. 19 is a flowchart for explaining another example of processing forextracting image feature vector from video signal.

FIG. 20 is a view for explaining a further example of processing forextracting image feature vector from video signal.

FIG. 21 is a flowchart for explaining a further example of processingfor extracting image feature vector from encoded video signal.

FIG. 22 is a view for explaining a further example of processing forextracting image feature vector from encoded video signal.

BEST MODE FOR CARRYING OUT THE INVENTION

Explanation will be given below in detail with reference to the attacheddrawings in connection with practical embodiments to which the presentinvention is applied. In this embodiment, the present invention isapplied to a similarity vector detection method and an apparatustherefor which detect, at a high speed, vectors similar to input vectorfrom plural registered vectors.

Specifically, in the similarity vector detection method and theapparatus therefor ofs this embodiment, in calculating distance betweentwo vectors, there is employed an approach to calculate distance whencorresponding distance is below a predetermined threshold value, and toonly detect, without calculating actual distance, that correspondingdistance is larger than threshold value when it is above thepredetermined value to thereby allow operation of similarity vectordetection to be conducted at a high speed. It is to be noted that, inthe similarity vector detecting apparatus in this embodiment, in thecase where distance is above threshold value, −1 is assumed to beoutputted for convenience.

Hereinafter, two vectors f and g for calculating distance arerepresented by the following formulas.f=(f[1], f[2], . . . , f[N])^(t)  (1)g=(g[1], g[2], . . . , g[N])^(t)  (2)

Here, in the formula (1), f[1], f[2], . . . represent respectivecomponents of vector f. In the formula (2), g[1], g[2], . . . representrespective components of vector g. In addition, t representstransposition and N represents dimension of vector.

(1) First Embodiment

Outline of the configuration of the similarity vector detectingapparatus in the first embodiment is shown in FIG. 1. As shown in FIG.1, the similarity vector detecting apparatus 1 serves to input vector fand vector g to output square distance between the vectors (or −1), andis composed of a recording unit 10, a hierarchical distance calculatingunit 11, and a threshold value judgment unit 12.

The processing at the time of registration in this similarity vectordetecting apparatus 1 will be explained by using the flowchart of FIG.2. First, at step S1, the recording unit 10 (FIG. 1) inputs in advanceregistered vector g. In general, vector g is plural numbers and maybecome vast number in many cases. Further, at the subsequent step S2,the recording unit 10 records inputted vector g.

As stated above, in the first embodiment, since it is unnecessary toconduct special operation at the time of registration, the apparatus issimple and is suitable for processing on the real time basis. In thisexample, the recording unit 10 is, e.g., magnetic disc, optical disc orsemiconductor memory, etc.

Subsequently, the processing at the time of retrieval in the similarityvector detecting apparatus 1 will be explained by using the flowchart ofFIG. 3. First, at step S10, the threshold value judgment unit 12(FIG. 1) sets threshold value S of distance. At the subsequent step S11,the hierarchical distance calculating unit 11 inputs vector f, andacquires one vector g recorded at the recording unit 10.

Subsequently, at step S12, the hierarchical distance calculating unit 11sets component number i serving as internal variable to 1, and setsintegrated value sum of distance to 0. At step S13, integratingoperation as indicated by the following formula (3) is performed betweenthe i-th component f[i] of vector f and the i-th component g [i] ofvector g.sum=sum+(f[i]−g[i])²  (3)

At step S14, the threshold value judgment unit 12 discriminates whetheror not integrated value sum is smaller than threshold value S. In thecase where integrated value sum is smaller than threshold value S (Yes),processing proceeds to step S16. In the case where integrated value sumis threshold value S or larger (No), the threshold value judgment unit12 outputs −1 at step S15 to complete processing. Here, as describedabove, −1 which is outputted is convenient numerical value indicatingthat distance between inputted vector f and acquired vector g is abovethreshold value S, and this vector g is nullified. As stated above, thethreshold value judgement unit 12 provides threshold value S and servesto truncate integrating operation at the hierarchical distancecalculating unit 11 in the case where integrated value sum is abovethreshold value S at the middle hierarchy of integrating operation tothereby realize high speed processing.

As step S16, it is discriminated whether or not component number i isthe number of dimensions N of vector f or vector g or smaller. In thecase where the component number i is N or smaller (Yes), i isincremented at step S17 to return to step S13. On the other hand, in thecase where the component number i is larger than N (No), the thresholdvalue judgment unit 12 outputs integrated value sum at step S18 becauseintegrating operation has been completed until the last component ofvector f or vector g to complete processing. It is to be noted thatintegrated value sum at this time is square of distance between vectors.

While the processing with respect to one registered vector g has beenindicated above in the flowchart of FIG. 3, similar processing isperformed with respect to registered all vectors g in practice tooutput, as vector similar to vector f, all vectors g in which integratedvalue sum of distances with respect to vector f is below the thresholdvalue S.

When the processing in the first embodiment which has been explainedabove is intuitively explained, this processing corresponds to theprocessing to calculate precise distance only with respect to registeredvectors in which distance from input vector indicated by x in the figureis within the range of super sphere having radius ✓S in connection witha large number of registered vectors indicated by black circle in FIG.4, and to nullify registered vectors without the range at the time pointwhen integrated value of distances of every respective axes is aboveradius.

It is to be noted that while square distance between vectors has beenused in the above-described explanation, similar technique may be usedwith respect to arbitrary distance scale without being limited to squaredistance. It should be noted that in the case where square distance isused, there is no possibility that erroneous nullification is caused totake place because integrated value sum monotonously increases withrespect to integrated value of distances between respective components.Moreover, since sum total of distances between respective components isin correspondence with distance between vectors, entirely the samedistances as simple full search method are outputted in regard tovectors f and g in which distance is threshold value ✓S or smaller sothat there is no possibility that error may take place.

Further, in the case of this technique, since it is unnecessary toprepare reference table, etc. which may break the time seriesrelationship, updating and/or deletion of data can be conducted inaccordance with time series order, so processing and/or management areeasy. In addition, it is also easily possible to conduct retrieval inaccordance with time series order, or to designate time series range tobe retrieved.

(2) Second Embodiment

In the above-described first embodiment, threshold value S of distanceis set, thereby making it possible to conduct retrieval equivalent tofull search at a high speed. However, in the case of this technique,since from which vector component execution of retrieval begins isdependent upon arrangement order of vectors, difference takes place inretrieval speed by this arrangement order. For example, in such casesthat deviation exists in distribution of vectors within feature space asshown in FIG. 5, retrieval speed greatly changes in dependency uponwhich of f[1] axis or f[2] axis is first integrated. In this example,employment of a method of first evaluating f[2] axis results in lessextra integration to thereby realize high speed operation.

In view of the above, in the second embodiment which will be explainedbelow, as indicated by the following formulas (4) and (5),multiplication of normal orthogonal transform matrix U is conducted withrespect to input vector f and registered vector g to perform orthogonaltransform operation to conduct retrieval in order of significance byusing the orthogonally transformed vectors f′ and g′ to thereby allowretrieval to be conducted at higher speed.f′=Uf  (4)g′=Ug  (5)

It is to be noted that square distance d² between two vectors g and f isnot changed by normal orthogonal transform matrix U as indicated by thefollowing formula (6).d ² =∥f′−g′∥ ² =∥U(f−g)∥²=(f−g)^(t) U ^(t) U(f−g)=(f−g)^(t)(f−g)=∥f−g∥²  (6)

Outline of the configuration of the similarity vector detectingapparatus in the second embodiment is shown in FIG. 6. As shown in FIG.6, the similarity vector detecting apparatus 2 serves to input vectors fand g to output distance between the vectors (or −1), and is composed ofvector transform units 20, 21, a recording unit 22, a hierarchicaldistance calculating unit 23, and a threshold value judgment unit 24.Here, the vector transform units 20, 21 serve to respectively implementsimilar transform operations to vectors g and f. In addition, therecording unit 22 is, e.g., magnetic disc, optical disc or semiconductormemory, etc.

The processing at the time of registration in this similarity vectordetecting apparatus 2 will be explained by using the flowchart of FIG.7. First, at step S20, the vector transform unit 20 (FIG. 6) inputsregistered vector g in advance. At the subsequent step S21, vector g istransformed as indicated by the above-described formula (5) to generatevector g′. Further, at step S22, the recording unit 10 recordstransformed vector g′.

Next, the processing at the time of retrieval in the similarity vectordetecting apparatus 2 will be explained by using the flowchart of FIG.8. First, at step S30, the threshold value judgment unit 24 (FIG. 6)sets threshold value S of distance. At the subsequent step S31, thevector transform unit 21 inputs vector f and the hierarchical distancecalculating unit 23 acquires one vector g′ recorded at the recordingunit 22.

Subsequently, at step S32, the vector transform unit 21 transformsvector f as indicated by the above-described formula (4) to generatevector f′.

At step S33, the hierarchical distance calculating unit 23 setscomponent number i serving as internal variable to 1, and setsintegrated value sum of distance to 0. At step S34, integratingoperation as indicated by the following formula (7) is performed betweenthe i-th component f′[i] of vector f′ and the i-th component g′[i] ofvector g′.sum=sum+(f′[i]−g′[i])²  (7)

At step S35, the threshold value judgment unit 24 discriminates whetheror not integrated value sum is smaller than threshold value S. In thecase where integrated value sum is smaller than threshold value S (Yes),processing proceeds to step S37. In the case where integrated value sumis threshold value S or larger (No), the threshold value judgment unit24 outputs −1 at step S36 to complete processing.

At step S37, it is discriminated whether or not the component number iis the number of dimensions N or smaller of vector f′ and vector g′. Inthe case where the component number i is N or smaller (Yes), i isincremented at step S38 to return to step S34. On the other hand, in thecase where the component number i is larger than N (No), the thresholdvalue judgment unit 24 outputs integrated value sum at step S39 becauseintegrating operation is completed up to the last component of vectorsf′ and g′ to complete processing. It is to be noted that the integratedvalue sum at this time is square of distance between vectors.

While the processing with respect to one registered vector g′ has beenindicated above in the flowchart of FIG. 8, there is employed inpractice an approach to perform similar processing with respect toregistered all vectors g′ to output, as vector similar to vector f′, allvectors g′ in which integrated value sum of distance with respect tovector f′ is below the threshold value S.

Here, while various matrixes may be used as the above-described normalorthogonal transform matrix U, explanation will be given below by takingfour examples in practical sense.

(2-1) Practical Example of Orthogonal Transform

(2-1-1)

Sequential matrix is mentioned as the most simple orthogonal transform.In this sequential matrix, order of vector component is caused to simplyundergo sequencing. For example, sequential matrix P of the eighth orderis expressed in a form as indicated by the following formula (8).$\begin{matrix}{P = \begin{bmatrix}0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 \\1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 \\0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 \\0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 \\0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 \\0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 \\0 & 0 & 0 & 0 & 0 & 0 & 1 & 0\end{bmatrix}} & (8)\end{matrix}$

In the case where distribution of respective components of vectors isdifferent as in the case of the above-described FIG. 5, it is obviousthat the larger dispersion of component is, the larger distribution withrespect to distance becomes. Accordingly, in determining order ofsequencing, it is optimum to prepare in advance sufficient number (I) ofsample vectors g_(i) to set sequential matrix arranged in order ofmagnitude of dispersion vector V calculated by the following formula(9). $\begin{matrix}{{V = {\sum\limits_{i = 1}^{I}\left( {g_{i} - \overset{\_}{g}} \right)^{2}}},{\overset{\_}{g} = {\frac{1}{I}{\sum\limits_{i}g_{i}}}}} & (9)\end{matrix}$

It is to be noted that the orthogonal transform using this sequentialmatrix is effective in such cases that ways of spreading of respectivevector components are different, and is high in speed since it issufficient to perform sequencing so that multiplication/division and/orconditional branch are not necessary.

(2-1-2)

In feature quantity where correlation relationship between adjacentcomponents is large, such as image feature quantity or acoustic featurequantity, etc., energy in the case where feature vector is considered asdiscrete signal deviates to lower frequency component.

In view of the above, Discrete Cosine Transform (DCT) represented by thefollowing formulas (10), (11), and Discrete Fourier Transform (DFT)represented by the following formulas (12), (13) are used as orthogonaltransform to conduct integration in order from low frequency component,thereby making it possible to perform integration in order fromcomponent of high significance. Thus, distance calculation is performedat a high speed. $\begin{matrix}{D = \begin{bmatrix}D_{11} & \ldots & D_{1N} \\\vdots & \ldots & \vdots \\D_{N1} & \ldots & D_{NN}\end{bmatrix}} & (10) \\{{D_{m\quad n} = {{\alpha\left( {m - 1} \right)}\cos\frac{\left( {m - 1} \right)\left( {{2n} - 1} \right)\pi}{2N}}},{\alpha = \left\{ \begin{matrix}{\sqrt{\frac{1}{N}}\quad\left( {n = 1} \right)} \\{\sqrt{\frac{2}{N}}\quad\left( {n \neq 1} \right)}\end{matrix} \right.}} & (11) \\{F = \begin{bmatrix}F_{11} & \ldots & F_{1N} \\\vdots & \ldots & \vdots \\F_{N1} & \ldots & F_{NN}\end{bmatrix}} & (12) \\{F_{mn} = \left\{ \begin{matrix}{\sqrt{\frac{1}{N}}\quad{\cos\left( \frac{{- 2}{\pi\left( {{n/2} - 1} \right)}\left( {m - 1} \right)}{N} \right)}} & \left( {n\text{:}\quad{even}} \right) \\{\sqrt{\frac{1}{N}}\quad{\sin\left( \frac{{- 2}{\pi\left( {{\left( {n + 1} \right)/2} - {N/2}} \right)}\left( {m - 1} \right)}{N} \right)}} & \left( {n\text{:}\quad{odd}} \right)\end{matrix} \right.} & (13)\end{matrix}$

Here, since high speed transform method can be used for Discrete CosineTransform or Discrete Fourier Transform, and since it is unnecessary tohold all transform matrixes, memory use quantity and/or operation speedin the case where operation is realized by computer are far advantageousas compared to the case where all calculations of matrix is performed.

(2-1-3)

The Walsh-Hadamard Transform is orthogonal transform where respectiveelements of transform matrix are constituted only by ±1, and is suitablefor high speed transform because multiplication is not required at thetime of transform. Here, sequency is used as concept close to frequencyand components are arranged in order from low sequency so that highspeed of distance calculation can be realized with respect to vectorswhere correlation relationship between adjacent component is largesimilarly to the above-described Discrete Cosine Transform or DiscreteFourier Transform.

The Walsh-Hadmard Transform matrix is constituted in accordance withcodes of Fourier Transform matrix, or is constituted by recursiveexpansion operation of matrix. As an example, the Walsh-HadamardTransform matrix W of the eighth order arranged in order of sequency isindicated by the following formula (14). $\begin{matrix}{W = {\frac{1}{\sqrt{8}}\begin{bmatrix}1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\1 & 1 & 1 & 1 & {- 1} & {- 1} & {- 1} & {- 1} \\1 & 1 & {- 1} & {- 1} & {- 1} & {- 1} & 1 & 1 \\1 & 1 & {- 1} & {- 1} & 1 & 1 & {- 1} & {- 1} \\1 & {- 1} & {- 1} & 1 & 1 & {- 1} & {- 1} & 1 \\1 & {- 1} & {- 1} & 1 & {- 1} & 1 & 1 & {- 1} \\1 & {- 1} & 1 & {- 1} & {- 1} & 1 & {- 1} & 1 \\1 & {- 1} & 1 & {- 1} & 1 & {- 1} & 1 & {- 1}\end{bmatrix}}} & (14)\end{matrix}$

(2-1-4)

In case where sufficient number of sample vectors are collected inadvance, and where a certain amount of cost can be required fortransform operation, it is effective that optimum Karhunen-LoeveTransform (hereinafter referred to as KL transform) is used asorthogonal transform.

The KL transform matrix T is eigen matrix in which dispersion matrix Vof sample vectors is decomposed into eigen values, and is defined asindicated by the following formula (15) in the case where eigen value isassumed as λ₁, λ_(N).V=T ^(t) ΛT,Λ=diag{λ₁, λ₂, . . . , λ_(N)}  (15)

Here, the KL transform is orthogonal transform matrix which completelyremoves correlation relationship between respective components, anddispersion of transformed vector components results in eigen valueλ_(i). Accordingly, the KL transform matrix T is constituted so thateigen values λ_(i) are arranged in order of magnitude to therebyintegrate all components to remove overlapping information thereafter tohave ability to perform integration of distances from the axis wheredispersion is the largest.

It is to be noted that, in the technique using this KL transform, sinceit is necessary to hold KL transform matrix T over the entire dimensionin principle at the time of operation, and since it is necessary toperform matrix operation of all order with respect to all vectors,operation cost is high. However, since this operation is performed atthe time of registration, it cannot be said that time required forretrieval processing for which high speed is required is particularlyincreased.

In addition, although slight degradation of accuracy is involved, thereis employed an approach to extract only vector components having largeeigen value to hold them without holding vector components having smalleigen value to thereby compress vector itself, thus also making itpossible to reduce memory area and/or data read-in time of the recordingunit 22 (FIG. 6).

(3) Third Embodiment

While the retrieval operation is caused to be conducted at a high speedby realization of high speed of distance calculation in theabove-described first and second embodiments, data read-in time from therecording unit, e.g., hard disc, etc. also results in cause of largeoverhead in performing retrieval.

Here, the KL transform in the above-described second embodimentcorresponds to analysis method called main component analysis in themultivariate analysis field, and is an operation for extracting maincomponent constituting vector. In view of the above, in the thirdembodiment which will be explained below, the main component oftransformed vector g′ obtained in the second embodiment is recorded asindex vector g₁, and the remaining component is recorded as detailvector g₂. At the time of retrieval, distance calculation is firstperformed with reference to index vector g₁ to acquire detail vector g₂only in the case where that result is smaller than threshold value S tofurther perform distance calculation, thereby making it possible toshorten data read-in time.

Outline of the configuration of the similarity vector detectingapparatus in the third embodiment is shown in FIG. 9. As shown in FIG.9, the similarity vector detecting apparatus 3 serves to input vector fand vector g to output square distance between vectors (or −1), and iscomposed of vector transform units 30, 31, an index recording unit 32, adetail recording unit 33, a hierarchical distance calculating unit 34,and a threshold value judgment unit 35. Here, the vector convertingunits 30, 31 serve to respectively implement transform operation similarto the above-described second embodiment to the vectors g and f. Inaddition, the index recording unit 32 and the detail recording unit 33are, e.g., magnetic disc, optical disc or semiconductor memory, etc.

The processing at the time of registration in this similarity vectordetecting apparatus 3 will be explained by using the flowchart of FIG.10. First, at step S40, the vector transform unit 30 (FIG. 9) inputsregistered vector g in advance. At the subsequent step S41, vector g istransformed as indicated by the above-described formula (5) to generatevector g′. Further, the vector transform unit 30 divides it into indexvector g₁ having a predetermined number M (1≦M<N) of components anddetail vector g₂ having the remaining component in order from componenthaving small component number, i.e., component having large dispersionor eigen value in the above-described transform operations or lowfrequency component. Further, at step S42, the index recording unit 32records index vector g₁. At step S43, the detail recording unit 33records detail vector g₂.

Next, the processing at the time of retrieval in the similarity vectordetecting apparatus 3 will be explained by using the flowchart of FIG.11. First, at step S50, the threshold value judgment unit 35 (FIG. 9)sets threshold value S of distance. At the subsequent step S51, thevector transform unit 31 inputs vector f, and the hierarchical distancecalculating unit 34 acquires one index vector g₁ recorded at the indexrecording unit 32.

Subsequently, at step S52, the vector transform unit 31 transformsvector f as indicated by the above-described formula (4) to generatevector f′. Further, the vector transform unit 31 divides it into indexvector f₁ having a predetermined number M (1≦M<N) of components anddetail vector f₂ having the remaining component in order from componenthaving small component number.

At step S53, the hierarchical distance calculating unit 34 setscomponent number i serving as internal variable to 1 and sets integratedvalue sum of distance to 0. At step S54, integrating operation asindicated by the following formula (16) is performed between the i-thcomponent f′[i] of vector f′ and the i-th component g′[i] of vector g′.sum=sum (f′[i]−g′[i])²  (16)

At step S55, the threshold value judgment unit 35 discriminates whetheror not integrated value sum is smaller than threshold value S. In thecase where integrated value sum is smaller than threshold value S (Yes),processing proceeds to step S57. In the case where integrated value sumis threshold value S or larger (No), the threshold value judgment unit35 outputs −1 at step S56 to complete processing. Here, as describedabove, −1 which is outputted is convenient numerical value indicatingthat distance is above the threshold value so that it is nullified.

At step S57, it is discriminated whether or not component number i isthe number of dimensions M of index vector f₁ and index vector g₁ orsmaller. In the case where the component number i is M or smaller (Yes),i is incremented at step S58 to return to the step S54. On the otherhand, in the case where component number i is larger than M (No), thehierarchical distance calculating unit 34 acquires one detail vector g₂recorded at the detail recording unit 33.

At step S60, the hierarchical distance calculating unit 34 performsintegrating operation as indicated by the above-described formula (16)between the i-th component f′[i] of vector f′ and the i-th componentg′[i] of vector g′.

At step S61, the threshold value judgment unit 35 discriminates whetheror not integrated value sum is smaller than threshold value S. In thecase where the integrated value sum is smaller than threshold value S(Yes), processing proceeds to step S63. In the case where integratedvalue sum is threshold value S or larger (No), the threshold valuejudgment unit 35 outputs −1 at step S62 to complete processing.

At step S63, it is discriminated whether or not the component number iis the number of dimensions N of vector f′ or vector g′ or smaller. Inthe case where the component number i is N or smaller (Yes), i isincremented at step S64 to return to the step S60. On the other hand, inthe case where the component number i is larger than N (No), thethreshold value judgment unit 35 outputs integrated value sum at stepS65 since integration is completed until the last component of vector g′to complete processing. At this time, the integrated value sum resultsin square of distance between vectors.

While the processing with respect to one registered vector g′ isindicated above in the flowchart of FIG. 11, similar processing isperformed with respect to all registered vectors g′ in practice tooutput, as vector similar to vector f′, all vectors g′ in whichintegrated value sum of distances with respect to vector f′ is below thethreshold value S.

In the above-described third embodiment, as compared to the first andsecond embodiments, memory capacity and/or accuracy are not changed, andoperating speed changes little. However, in the case where mostcomparisons are nullified at the stage of index vector g₁ so that it isunnecessary to acquire detail vector g₂, overhead by data access iscancelled.

While it is assumed in the above-described explanation that vector isdivided into two stages of index vector and detail vector, it is amatter of course that there can be made expansion to multi-stage, suchas, for example, index vector is further similarly divided into indexvector of high order and detailed index vector so that three-stageconfiguration is provided.

(4) Extraction of Feature Vector

Explanation will be given below in connection with a technique ofextracting feature vector from acoustic signal or video signal. In amanner described later, acoustic feature vector and/or image featurevector are extracted to use them as the above-described vectors f and g,thereby making it possible to retrieve, at a high speed, similaracoustic or video signal from registered acoustic signal or video signalby using the techniques of the above-described first to thirdembodiments in the case where acoustic signal or video signal isinputted.

(4-1) Extraction of Acoustic Feature Vector

(4-1-1)

Explanation will be given by using the flowchart of FIG. 12 and FIG. 13in connection with the example of the case where power spectrumcoefficients are used as feature quantity relating to acoustic signal.First, at step S70, as shown in FIG. 13, acoustic signals with respectto each time period T are acquired from acoustic signal within objecttime period.

Subsequently, at step S71, spectrum operation, e.g., high speed Fouriertransform, is implemented to the acquired acoustic signal to determinepower spectrum coefficients S_(q) (q=0, 1, . . . , Q−1) with respect toeach short time period. Here, q is index representing discrete frequencyand Q is the maximum discrete frequency.

Subsequently, at step S72, it is discriminated whether or notcalculation within object time period is completed. In the case wheresuch calculation is completed (Yes), processing proceeds to step S73. Inthe case where such calculation is not completed (No), processingreturns to the step S70.

At step S73, average spectrum S′q of the determined power spectrumcoefficients S_(q) is calculated. At step S74, this average spectrumS′_(q) is changed into vector to generate acoustic feature vector a.This acoustic feature vector a is represented by, e.g., the followingformula (17).a=(S₀, . . . , S_(Q)−1)  (17)

It is to be noted that while explanation has been given in theabove-described example on the premise that acoustic signal withinobject time period is divided into each time period T, spectrumoperation may be implemented without dividing into each time period T inthe case where the object time period is short.

In addition, while the example using power spectrum coefficient has beenexplained in the above-described example, the present invention is notlimited to such implementation but cepstrum coefficient havingequivalent information, etc., may also be used. Further, in place ofFourier transform, similar effect can also be obtained by linearpredictive coefficient using AR (Auto-Regressive) model.

(4-1-2)

Since the acoustic signal is vast, there are many instances where suchsignal is recorded or is caused to undergo transmission after beingcompression-encoded. While it is possible to extract acoustic featurevector a by using the above-described technique after encoded acousticsignal is decoded into signal in the base band, extracting processingcan be conducted efficiently and at a high speed if acoustic featurevector a can be extracted only by partial decoding.

Here, in the transform encoding which is encoding method generally used,acoustic signal serving as original sound is divided into frames withrespect to each time period T, as shown in FIG. 14. Further, orthogonaltransform such as Modified Discrete Cosine Transform (MDCT), etc. isimplemented to acoustic signal with respect to each frame, and thecoefficients thereof are quantized and encoded. In this instance, scalefactors serving as normalization coefficient of magnitude are extractedwith respect to each frequency band, and are separately encoded. In viewof the above, by decoding only the scale factors, they can be used asacoustic feature vector a.

Explanation will be given by using the flowchart of FIG. 15 and FIG. 16in connection with the example of the case where scale factors are usedas feature quantity relating to acoustic signal. First, at step S80,encoded acoustic signal within the time period T in the object timeperiod is acquired. At step S81, scale factors with respect to eachframe are partially decoded.

Subsequently, at step S82, it is discriminated whether or not decodingwithin the object time period is completed. In the case where suchdecoding is completed (Yes), processing proceeds to step S83. In thecase where such decoding is not completed (No), processing returns tothe step S80.

At step S83, maximum scale factors are detected with respect to eachband from scale factors within the object time period. At step S84,those scale factors are changed into vectors to generate acousticfeature vector a.

In this way, it is possible to extract, at a high speed, acousticfeature vector a equivalent to the above without completely decodingencoded acoustic signal.

(4-2) Extraction of Image Feature Vector

(4-2-1)

Explanation will be given by using the flowchart of FIG. 17 and FIG. 18in connection with the example of the case where luminance informationand color information are used as feature quantity relating to videosignal. First, at step S90, as shown in FIG. 18, image frame is acquiredfrom video signal within the object time period T.

Subsequently, at step S91, time average image 100 is prepared on thebasis of acquired all image frames.

Subsequently, at step S92, the prepared time average image 100 isdivided into X×Y small blocks in breadth and width directions to prepareblock average image 110 in which pixel values within respective blocksare averaged.

Further, at step S93, these small blocks are arranged in order of R, G,B, e.g., from the left upper direction toward the right lower directionto generate one-dimensional image feature vector v. This image featurevector v is represented by, e.g., the following formula (18).v=(R ₀₀ , . . . , R _(X-1,Y-1) , G ₀₀ , . . . , G _(X-1,Y-1) , B ₀₀ , .. . , B _(X-1,Y-1))  (18)

It is to be noted that explanation has been given in the above-describedexample in connection with the example where pixel values of the blockaverage image 110 in which the time average image 100 is divided arerearranged to generate one-dimensional image feature vector v, however,the present invention is not limited to such implementation, but theremay be employed an approach to rearrange pixel values of the timeaverage image 100 without preparing the block average image 110 togenerate one-dimensional image feature vector v.

In addition, since time change of video signal is not so rapid in theordinary state, it is also possible to obtain the sameeffects/advantages by employing an approach to select, as representativeimage, one frame within the object time period without preparing thetime average image 100 to substitute it.

(4-2-2)

There are many instances where there exist a certain relation in imageswhere distribution of color with respect to all images are similar,e.g., studio image, etc. photographed from the same angle of news imageeven in the case where corresponding video signal is not entirely thesame video signal. Thus, there is a demand for performing retrieval inthe state where these images are considered to be the same. In suchcase, it is effective to employ a method of rejecting spatial dependencyof image to prepare histogram of color distribution to make comparison.

In view of the above, explanation will be given by using the flowchartof FIG. 19 and FIG. 20 in connection with the example of the case wherehistogram of color distribution is used as feature quantity in this way.First, at step S100, as shown in FIG. 20, image frame is acquired fromvideo signal within object time period T.

Subsequently, at step S101, histogram with respect to signal values ofrespective colors, e.g., R, G, B is prepared from signal values ofrespective image frames.

Further, at step S102, these colors are arranged in order of, e.g., R,G, B to generate one-dimensional image feature vector v. This imagefeature vector v is represented by the following formula (19).v=(R ₀ , . . . , R _(N-1) , G ₀ , . . . , G _(N-1) , B ₀ , . . . , B_(N-1))  (19)

It is to be noted that while explanation has been given in theabove-described example on the premise that histogram with respect tosignal values of R, G, B is prepared, it is possible to obtain similareffects/advantages even if histogram with respect to signal values ofluminance (Y) and color difference (Cb, Cr) is prepared.

(4-2-3)

Since video signal is vast, there are many cases where such signal isrecorded or is caused to undergo transmission after beingcompression-encoded. While it is possible to extract image featurevector v by using the above-described technique after employing anapproach to decode encoded video signal into signal of base band,extraction processing can be performed efficiently and at a high speedif image feature vector v can be extracted only by partial decoding.

Explanation will be given by using the flowchart of FIG. 21 and FIG. 22in connection with the example of the case where image feature vector vis extracted from video signal compression-encoded by MPEG1 (MovingPicture Experts Group 1) or MPEG2. First, at step S110, encoded videosignal of encoded group (Group of pictures: GOP) proximate to objecttime period T to be changed into vector is acquired to acquireintra-frame encoded picture (I picture) 120 within that GOP.

Here, frame image is encoded with macro block MB (16×16 pixels, or 8×8pixels) being as unit, and Discrete Cosine Transform (DCT) is used.These DC-transformed DC coefficients correspond to average value ofpixel values of image within macro block.

In view of the above, at step S111, these DC coefficients are acquired.At the subsequent step S112, these coefficients are arranged in orderof, e.g., Y, Cb, Cr to generate one-dimensional image feature vector v.This image feature vector v is represented by, e.g., the followingformula (20).v=(Y ₀₀ , . . . , Y _(X-1,Y-1) , Cb ₀₀ , . . . , Cb _(X-1,Y) ₁ , Cr ₀₀ ,. . . , Cr _(X-1,Y-1))  (20)

In this way, it is possible to extract image feature vector v at a highspeed without completely decoding encoded video signal.

It is to be noted that while explanation has been given in theabove-described example that video signal which has beencompression-encoded by the MPEG1 or the MPEG2 is assumed to be used, thepresent invention may also be applied to other compression-encodingsystem.

(5) Others

As explained above, in accordance with this embodiment, hierarchicaldistance integrating operation is performed in detecting analogous(similar) vector on the basis of distance between vectors to truncatedistance integrating operation at the time when integrated value ofdistances is above threshold value with respect to distance set inadvance, thereby making it possible to detect similar vector at a highspeed. Particularly, in such cases that vector similar to input vectoris detected from a large quantity of registered vectors, since mostregistered vectors are non-similar so that integrated value of distancesis above threshold value, distance calculation can be truncated at theearly stage. Thus, detection time can be shortened to a large extent.

In addition, by implementing sequential transform, Discrete CosineTransform, Discrete Fourier Transform, Walsh-Hadamard Transform or KLTransform in advance to vector to perform integrating operation in orderfrom vector component having high significance, i.e., component havinglarge dispersion or eigen value in the above-described transformoperations or in order from low frequency component, it is possible todetect similar vector efficiently and at a high speed, taking thedistribution of vector components into consideration.

Accordingly, also in performing retrieval of acoustic signal or videosignal, acoustic feature vector and/or image feature vector is extractedin advance to register the vector thus extracted, whereby in the casewhere arbitrary acoustic signal or video signal is inputted, similaracoustic or video signals can be retrieved at a high speed whilemaintaining structural simplicity and/or retrieval accuracy similar tofull search.

While the invention has been described in accordance with certainembodiments thereof illustrated in the accompanying drawings anddescribed in the above description in detail, it should be understood bythose ordinarily skilled in the art that the invention is not limited tothe embodiments, but various modifications, alternative embodiments orequivalents can be implemented without departing from the scope andspirit of the present invention as set forth and defined by the appendedclaims.

For example, while the present invention has been explained in theabove-described embodiments as the configuration of hardware, thepresent invention is not limited to such implementation, but arbitraryprocessing may be also realized by allowing CPU (Central ProcessingUnit) to execute computer program. In this case, computer program may beprovided in the state where it is recorded on recording medium, or maybe provided by allowing it to undergo transmission through othertransmission medium such as Internet.

INDUSTRIAL APPLICABILITY

In accordance with the above-described present invention, there isemployed such approach to perform distance calculation between twovectors in a hierarchical manner, whereby in the case where thatintegrated value of distances calculated up to a certain hierarchy isabove a predetermined threshold value, it is only detected, withoutcalculating actual distance, that the integrated value of distances isthreshold value or larger, thereby permitting operation to be conductedat a high speed. Particularly, in such cases that vector similar toinput vector is detected from a large quantity of registered vectors,since most registered vectors are non-similar and thus integrated valueof distances is above threshold value, distance calculation can betruncated at the early stage. Therefore, detection time can be shortenedto a large extent.

1. A similarity calculation method of determining similarity between twoinput vectors, including a hierarchical distance calculation step ofperforming distance calculation between the two input vectors in ahierarchical manner, a threshold value comparison step of comparingintegrated value of distances calculated at respective hierarchies ofthe hierarchical distance calculation step with a threshold value set inadvance, a control step of controlling distance calculation at thehierarchical distance calculation step in accordance with comparisonresult at the threshold value comparison step, and an output step ofoutputting, as the similarity, integrated value of the calculateddistances up to the last hierarchy, wherein, at the control step,control is conducted such that distance calculation is truncated in thecase where integrated value of distances calculated up to a certainhierarchy is above the threshold value.
 2. The similarity calculationmethod as set forth in claim 1, wherein distance calculation betweenrespective components constituting the two input vectors is performed ina hierarchical manner at the hierarchical distance calculation step,whereby in the case where integrated value of distances calculated up toa certain hierarchy is below the threshold value, distance calculationbetween next components is performed.
 3. The similarity calculationmethod as set forth in claim 2, which further includes a transform stepof implementing a predetermined transform operation to the two inputvectors, wherein distance calculation between the two input vectorstransformed at the transform step is performed in a predetermined orderbased on the predetermined transform operation at the hierarchicaldistance calculation step.
 4. The similarity calculation method as setforth in claim 3, wherein the predetermined transform operation is atransform operation which performs sequencing of order of respectivecomponents constituting the two input vectors in accordance withmagnitude of dispersion of the respective components, and whereindistance calculation between the two input vectors transformed at thetransform step is performed in order from components of large dispersionat the hierarchical distance calculation step.
 5. The similaritycalculation method as set forth in claim 3, wherein the predeterminedtransform operation is Discrete Cosine Transform operation or DiscreteFourier Transform operation, and wherein distance calculation betweenthe two input vectors transformed at the transform step is performed inorder from low frequency component at the hierarchical distancecalculation step.
 6. The similarity calculation method as set forth inclaim 3, wherein the predetermined transform operation is Walsh-HadamardTransform operation, and wherein distance calculation between the twoinput vectors transformed at the transform step is performed in orderfrom low sequency component at the hierarchical distance calculationstep.
 7. The similarity calculation method as set forth in claim 3,wherein the predetermined transform operation is Karhunen-Loevetransform operation, and wherein distance calculation between the twoinput vectors transformed at the transform step is performed in orderfrom component of large eigen value at the hierarchical distancecalculation step.
 8. The similarity calculation method as set forth inclaim 3, which further includes a division step of taking out respectivecomponents constituting the two input vectors transformed at thetransform step in the predetermined order to divide them intohierarchical plural partial vectors, wherein distance calculationbetween respective components constituting partial vectors is performedin a hierarchical manner in order from the partial vector of theuppermost hierarchy at the hierarchical distance calculation step,whereby in the case where integrated value of calculated distancesbetween all components constituting partial vectors up to a certainhierarchy is below the threshold value, distance calculation betweenrespective components constituting partial vector of one hierarchy loweris performed.
 9. The similarity calculation method as set forth in claim1, wherein the input vector is obtained by changing an acoustic signalinto feature vector, and wherein the feature vector is obtained bychanging power spectrum coefficients within a predetermined time periodof the acoustic signal into vector.
 10. The similarity calculationmethod as set forth in claim 1, wherein the input vector is obtained bychanging an acoustic signal into feature vector, and wherein the featurevector is obtained by changing linear predictive coefficients within apredetermined time period of the acoustic signal into vector.
 11. Thesimilarity calculation method as set forth in claim 1, wherein the inputvector is obtained by changing an encoded acoustic signal into featurevector, and wherein the feature vector is obtained by changingparameters indicating intensities of frequency components withinrespective frames of the encoded acoustic signal into vectors.
 12. Thesimilarity calculation method as set forth in claim 1, wherein the inputvector is obtained by changing a video signal into feature vector, andwherein the feature vector is obtained by changing signal value ofrepresentative image within a predetermined time period of the videosignal, average image of frame image within the predetermined timeperiod, or small image obtained by dividing, on predetermined block unitbasis, the representative image or the average image into vector. 13.The similarity calculation method as set forth in claim 1, wherein theinput vector is obtained by changing a video signal into feature vector,and wherein the feature vector is obtained by changing histogram withrespect to luminance and/or color of frame image within a predeterminedtime period of the video signal into vector.
 14. The similaritycalculation method as set forth in claim 1, wherein the input vector isobtained by changing encoded video signal into feature vector, andwherein the feature vector is obtained by changing signal values of DCcomponents of respective blocks serving as encoding unit of intraframeencoding image proximate to a predetermined time period of the encodedvideo signal into vector.
 15. A similarity calculating apparatus adaptedfor determining similarity between two input vectors, comprisinghierarchical distance calculating means for performing distancecalculation between the two input vectors in a hierarchical manner,threshold value comparing means for comparing integrated value ofdistances calculated at respective hierarchies by the hierarchicaldistance calculating means with a threshold value set in advance,control means for controlling distance calculation by the hierarchicaldistance calculating means in accordance with comparison result by thethreshold value comparing means, and output means for outputting, as thesimilarity, integrated value of distances calculated up to the lasthierarchy, wherein the control means is operative so that in the casewhere integrated value of distances calculated up to a certain hierarchyis above the threshold value as the result of comparison by thethreshold comparing means, it conducts a control so as to truncatedistance calculation.
 16. The similarity calculating apparatus as setforth in claim 15, wherein the hierarchical distance calculating meansperforms distance calculation between respective components constitutingthe two input vectors in a hierarchical manner, whereby in the casewhere integrated value of distances calculated up to a certain hierarchyis below the threshold value, it performs distance calculation betweennext components.
 17. The similarity calculating apparatus as set forthin claim 16, which further comprises transform means for implementing apredetermined transform operation to the two input vectors, wherein thehierarchical distance calculating means performs distance calculationbetween the two input vectors transformed by the transform means in apredetermined order based on the predetermined transform operation. 18.The similarity calculating apparatus as set forth in claim 17, whichcomprises dividing means for taking out, in the predetermined order,respective components constituting the two input vectors transformed bythe transform means to divide them into hierarchical plural partialvectors, wherein the hierarchical distance calculating means performs,in a hierarchical manner, distance calculation between respectivecomponents constituting partial vectors in order from the partial vectorof the uppermost rank hierarchy, whereby in the case where integratedvalue of calculated distances calculated between all componentsconstituting partial vectors up to a certain hierarchy is below thethreshold value, the hierarchical distance calculating means performsdistance calculation between respective components constituting partialvector of one hierarchy lower.
 19. A program for allowing computer toexecute similarity calculation processing for determining similaritybetween two input vectors, including a hierarchical distance calculationstep of performing distance calculation between the two input vectors ina hierarchical manner, a threshold value comparison step of comparingintegrated value of distances calculated at respective hierarchies ofthe hierarchical distance calculation step with a threshold value set inadvance, a control step of controlling distance calculation at thehierarchical distance calculation step in accordance with comparisonresult at the threshold value comparison step, and an output step ofoutputting, as the similarity, integrated value of distances calculatedup to the last hierarchy, wherein, at the control step, in the casewhere integrated value of distances calculated up to a certain hierarchyis above the threshold value at the threshold value comparison step,control is conducted in such a manner to truncate distance calculation.20. The program as set forth in claim 19, wherein distance calculationbetween respective components constituting the two input vectors isperformed in a hierarchical manner at the hierarchical distancecalculation step, whereby in the case where the integrated value ofdistances calculated up to a certain hierarchy is below the thresholdvalue, distance calculation between next components is performed. 21.The program as set forth in claim 20, including a transform step ofimplementing a predetermined transform operation to the two inputvectors, wherein, at the hierarchical distance calculation step,distance calculation between the two input vectors transformed at thetransform step is performed in a predetermined order based on thepredetermined transform operation.
 22. The program as set forth in claim21, which further includes a division step of taking out, in thepredetermined order, respective components constituting the two inputvectors transformed at the transform step to divide them intohierarchical plural partial vectors, wherein distance calculationbetween respective components constituting partial vectors is performedin a hierarchical manner in order from the partial vector of theuppermost hierarchy at the hierarchical calculation step, whereby in thecase where integrated value of calculated distances between allcomponents constituting partial vectors up to a certain hierarchy isbelow the threshold value, distance calculation between respectivecomponents constituting partial vector of one hierarchy lower isperformed.
 23. A computer readable medium adapted so that program forallowing computer to execute similarity calculation processing whichdetermines similarity between two vectors is recorded, the programincluding a hierarchical distance calculation step of performingdistance calculation between the two input vectors in a hierarchicalmanner, a threshold value comparison step of comparing integrated valueof distances calculated at respective hierarchies of the hierarchicaldistance calculation step with a threshold value set in advance, acontrol step of controlling distance calculation at the hierarchicaldistance calculation step in accordance with comparison result at thethreshold value comparison step, and an output step of outputting, asthe similarity, integrated value of distances calculated up to the lasthierarchy, wherein, at the control step, in the case where integratedvalue of distances calculated up to a certain hierarchy is above thethreshold value at the threshold value comparison step, control isconducted in such a manner to truncate distance calculation.
 24. Therecording medium as set forth in claim 23, wherein distance calculationbetween respective components constituting the two input vectors isperformed in a hierarchical manner at the hierarchical distancecalculation step, whereby in the case where integrated value ofdistances calculated up to a certain hierarchy is below the thresholdvalue, distance calculation between next components is performed. 25.The recording medium as set forth in claim 24, wherein the programfurther including a transform step of implementing a predeterminedtransform operation to the two input vectors, and wherein, at thehierarchical distance calculation step, distance calculation between thetwo input vectors transformed at the transform step is performed in apredetermined order based on the predetermined transform operation. 26.The recording medium as set forth in claim 25, wherein the programincluding a division step of taking out, in the predetermined order,respective components constituting the respective two input vectorstransformed at the transform step to divide them into hierarchicalplural partial vectors, and wherein distance calculation betweenrespective components constituting partial vectors is performed in ahierarchical manner in order from the partial vector of the uppermosthierarchy at the hierarchical distance calculation step, whereby in thecase where integrated value of calculated distances between allcomponents constituting partial vectors up to a certain hierarchy isbelow the threshold value, distance calculation between respectivecomponents constituting partial vector of one hierarchy lower isperformed.